/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.setup.trac.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Enumeration;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.lang.RandomStringUtils;
import org.hibernate.HibernateException;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.id.IncrementGenerator;
import org.hibernate.type.Type;

/**
 *
 * @author edoardo
 */
public class TracRandomAlphaNumericGenerator extends IncrementGenerator {



    @Override
    public Serializable generate(SessionImplementor session, Object obj) throws HibernateException {
        String result = RandomStringUtils.randomAlphanumeric(20);
        return result;
    }
}
